UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Kc2Z2Z9PASGgZ7iqdT1JAUTEl4XOKUrNMYBo+pr5AY='
WHERE
key_id = '90e469d5aaaf194ea5063b7af75a60e0a4b92141881880f6be060e6155391b99'
AND (
token = '+Kc2Z2Z9PASGgZ7iqdT1JAUTEl4XOKUrNMYBo+pr5AY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)