UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bVxbr/OeGzxao8dm5I2bE13dNa9S0x28fN/eqcUS/WQ='
WHERE
key_id = '5cf2be1f7bd78cba6a1fbd4bdb4d3a5312f7718b8c0bd2cb3e8f0cdb6a05e737'
AND (
token = 'bVxbr/OeGzxao8dm5I2bE13dNa9S0x28fN/eqcUS/WQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)