UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/6k/nZarx/8owqO8MqqXukbCq0iWoZ/lz/RXLt8oP6E=' 
WHERE 
  key_id = 'b54ecbc688cd669c018fcfbaaa184598c73520bc4ede5b719a003b5471988048' 
  AND (
    token = '/6k/nZarx/8owqO8MqqXukbCq0iWoZ/lz/RXLt8oP6E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041