UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lMR3vyxIW7OR25dLd7yV/akmp1DFjhInas5b/1Ziyrg='
WHERE
key_id = '725c4b1b5ad57c906d5c57d8b42c7210d68c8ae2fefb0dd4df403ec08586319c'
AND (
token = 'lMR3vyxIW7OR25dLd7yV/akmp1DFjhInas5b/1Ziyrg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)