UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7/FeV14jxdu/+Q6fiO+dSOsnIDLor/QtfW+WyT1dAwk='
WHERE
key_id = '8b8a5d4cd0c7059ad4682b5a8e341d174126142ff4b3c1a1cc2fbfc8e349f8fa'
AND (
token = '7/FeV14jxdu/+Q6fiO+dSOsnIDLor/QtfW+WyT1dAwk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)