UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '59RtQDiSqRMfYm0ZB2QH6XsoG8DGcOBePxPsQGY4bSE=' 
WHERE 
  key_id = '67a39edac9ebaf90fda57ce6c9890df90f89b9c51b00f1cce055aac7d0237d06' 
  AND (
    token = '59RtQDiSqRMfYm0ZB2QH6XsoG8DGcOBePxPsQGY4bSE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030