UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sljcjTSgXvBRh1bfEfE+woVZLxny5LRxh+UNyl2NpfA='
WHERE
key_id = '7cd3df2a9f003af5dd2f767854b0d69ceb73b650e657133ec54f2fc472285151'
AND (
token = 'sljcjTSgXvBRh1bfEfE+woVZLxny5LRxh+UNyl2NpfA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)