UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rd+BSlWETyrmzk4JfBhfToQN6inhjUMe3DlVramLxvM='
WHERE
key_id = '737c859e9635b5cda55b0f0d9046851bdba4d22996ba0166d0b3e4010998b9cd'
AND (
token = 'rd+BSlWETyrmzk4JfBhfToQN6inhjUMe3DlVramLxvM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)