UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GvLI/5KdaaJIFojCpHM6QaEomZgpjqATBOLDTZwiZuk=' 
WHERE 
  key_id = '9e4baa04f9328cc54fc2ad61319525eb14c047cd26868d0b8326272e25b31cc1' 
  AND (
    token = 'GvLI/5KdaaJIFojCpHM6QaEomZgpjqATBOLDTZwiZuk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00063