UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oE6HI/0CuQKUJe23MkKCdSamQlxrMpvWvrUh9SVJ9T0='
WHERE
key_id = '9b5417d6f635ad4aae161a72e47b0117863874fba78b6c5cd0d282a368af1a32'
AND (
token = 'oE6HI/0CuQKUJe23MkKCdSamQlxrMpvWvrUh9SVJ9T0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)