UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1UUODob+nWGPWj4AN5IpT1HPuHRKLBmQOhgPu0xDN2o='
WHERE
key_id = '1d3d2b0215de2f2b7dbfa52302066a5aacd2b50cb7d5317e6026f2ae248d0d69'
AND (
token = '1UUODob+nWGPWj4AN5IpT1HPuHRKLBmQOhgPu0xDN2o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)