UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/UPDvWTZ013ocFwyNV2nmLcEiuSd/tvZ89SKjjVkyl8=' 
WHERE 
  key_id = '99067c6298c55f5fadccbdefaadf46d0aff444cfca4d2223cc3b32b86d697f15' 
  AND (
    token = '/UPDvWTZ013ocFwyNV2nmLcEiuSd/tvZ89SKjjVkyl8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054