UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3r0m/k4Q4AzqMflu98oUKSX1pO4jIL4+ibUYQHyX/yQ='
WHERE
key_id = '01dce7c399bec2012726888acd3f00552ef9e2b520bbbaff42b37ab846561e30'
AND (
token = '3r0m/k4Q4AzqMflu98oUKSX1pO4jIL4+ibUYQHyX/yQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)