UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Be6Rv39Ft8TyYtTO+CvkV4Ol0A4abJqEudBTUFpxF/c='
WHERE
key_id = 'f90510322d915c42f3db293caf6a770469ae743480fbe3f55d74f5589c0180de'
AND (
token = 'Be6Rv39Ft8TyYtTO+CvkV4Ol0A4abJqEudBTUFpxF/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)