UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zKAs8tCng4pCP3AMJQDaEd7+KiUrw39wykrXbscRuE8='
WHERE
key_id = '73d3b306e9cf01d37a50b45fd7591aa56921c56bb9697607fc41f808a86174b3'
AND (
token = 'zKAs8tCng4pCP3AMJQDaEd7+KiUrw39wykrXbscRuE8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)