UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3xjwnMdU3HV8RTzDiEa3NkyeR8j4c1Fn3VeeJwUD4Wg='
WHERE
key_id = '60a07e27a96de0a0f3a6f06e20267f2a1a8ebfbfa110b0cefa3f21ae763b73d6'
AND (
token = '3xjwnMdU3HV8RTzDiEa3NkyeR8j4c1Fn3VeeJwUD4Wg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)