UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LCNw08ArQhfYVGfAEVjvIEQM69kmFL+XaFDHjaZRznc='
WHERE
key_id = 'b91626c4fee226723678b13891388a0b9dbed6c2dfdbbf38d9f9652ab9dcd9cf'
AND (
token = 'LCNw08ArQhfYVGfAEVjvIEQM69kmFL+XaFDHjaZRznc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)