UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Eml9THT2DfmmeJVzzpNUQ7oZUVZNyRBHLJCb9aL7zzc='
WHERE
key_id = '32c03d39598e9e6c6fac5d6a0ec1f9b02bf193cbf76d274677f898392d09b5eb'
AND (
token = 'Eml9THT2DfmmeJVzzpNUQ7oZUVZNyRBHLJCb9aL7zzc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)