UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L5HoeE8Ns4Kt8UvEFzEHUKJvS2u/EBBcrw2hrl/jio0='
WHERE
key_id = '9ad76bb9833c7d66c5c320107b1e841cb2affeb980a76d6189c459dbfea0ac79'
AND (
token = 'L5HoeE8Ns4Kt8UvEFzEHUKJvS2u/EBBcrw2hrl/jio0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)