UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lM3LOPKa7UKSFsXRoppYA8cNBPCJy2+hN2IjYQC5l0Q=' 
WHERE 
  key_id = '0d05eb5c9d637f0bd4f3ecfc3d3ef11b3b3690987ddf854a31135cc94e2b98fe' 
  AND (
    token = 'lM3LOPKa7UKSFsXRoppYA8cNBPCJy2+hN2IjYQC5l0Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028