UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YrLvBaNYpfZxwTS20Cb7t4mO7o9r6wIxqxMhaNjY/pU='
WHERE
key_id = 'c6ef76a33a67484e1b0d30ca79402c71ceed900451210b5e7b39808aff0bc471'
AND (
token = 'YrLvBaNYpfZxwTS20Cb7t4mO7o9r6wIxqxMhaNjY/pU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)