UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nEulMNkxV5eycl20R9y1kOqbmdAXS5RTDzzzSrivj6A='
WHERE
key_id = '76e8980e5ad94a776a0964b68375840dc7fca6e8dbd6d7cad81db75cd5fc676f'
AND (
token = 'nEulMNkxV5eycl20R9y1kOqbmdAXS5RTDzzzSrivj6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)