UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OzRI7SUa3lBYjIRCJbkSN5tuLp2AVGaZ6OagTtB83Yg='
WHERE
key_id = 'bf25d1675e172f32f6348c043c685a071e5c04bd54b5ca1ef146d5183810e6ba'
AND (
token = 'OzRI7SUa3lBYjIRCJbkSN5tuLp2AVGaZ6OagTtB83Yg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)