UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rLO6oaPvB9sK65uJTdM2spnvm7f6nIow0mNjz2JokHI='
WHERE
key_id = 'fb94630805bf6a45d3dd7f1e0276f55b1b23c336a05c792eb9c369a41706d370'
AND (
token = 'rLO6oaPvB9sK65uJTdM2spnvm7f6nIow0mNjz2JokHI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)