UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wVptizYTz2mS/IGlms45Q1/Mjzx1TvWRgKUgVQ6znFU=' 
WHERE 
  key_id = '8d04937ae5f400154694c3644997cf7b36f595aed1d60ad8083e300498716b0f' 
  AND (
    token = 'wVptizYTz2mS/IGlms45Q1/Mjzx1TvWRgKUgVQ6znFU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00045