UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ukPR8ZkI+5zNwUcB8MURB4odnsaRdHNKnTcTgo6pSu4='
WHERE
key_id = '7bc661e277cb58f788d42e949bdae9f463d3ea928da29e9e56e25a7ea8378b7f'
AND (
token = 'ukPR8ZkI+5zNwUcB8MURB4odnsaRdHNKnTcTgo6pSu4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)