UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's1IerEk6fvGifOXJcyfvM9rNwkTs3Hadmgiv/g9P1Ec='
WHERE
key_id = '362fe71abe6b5ce63f621f28e62cff28b30812f7a37c3b75831356c2a1f8cf66'
AND (
token = 's1IerEk6fvGifOXJcyfvM9rNwkTs3Hadmgiv/g9P1Ec='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)