UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wFDjIi5uinASmLzvF+uiUFM053ld8v6XffIu9BOK8GM='
WHERE
key_id = 'a92f424feac43cdf7e5e0f881bd03a62557e6ab6d425d168ab69376046390d01'
AND (
token = 'wFDjIi5uinASmLzvF+uiUFM053ld8v6XffIu9BOK8GM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)