UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Jr27gh+2EkzzPejx5+W9HGPi5CwBJDnuI/i0g1X7ZkM='
WHERE
key_id = 'dac19b6a8893e47c7c6dc9c37006964dfdf434c6dd755b8413b9c055441c6f62'
AND (
token = 'Jr27gh+2EkzzPejx5+W9HGPi5CwBJDnuI/i0g1X7ZkM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)