UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rcac/EmSBdFpK2Keyg2zZPzpYKC/vhpxKJNoDt3dpwk='
WHERE
key_id = '6f660da15ad0a3e9091ca9bf066c5a6e557c183299040bab6801957e434fca57'
AND (
token = 'Rcac/EmSBdFpK2Keyg2zZPzpYKC/vhpxKJNoDt3dpwk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)