UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gJUHeOYi6OcfynXKZh0rvbok9plQ+IOKCuUmR0N2pF8='
WHERE
key_id = '7a2b8c094c8d3066cc6bd62e9311c8ae8a49b9b2dcdf33a82d2ea0fc63c92c89'
AND (
token = 'gJUHeOYi6OcfynXKZh0rvbok9plQ+IOKCuUmR0N2pF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)