UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/bM0Q+bnCTBRm9kTJm5x9t2i5Vo2tAa3Jg0d8jj2W3E=' 
WHERE 
  key_id = '2bf01d432976212d54e855df297e5e8b476640926562880c86825507c092515b' 
  AND (
    token = '/bM0Q+bnCTBRm9kTJm5x9t2i5Vo2tAa3Jg0d8jj2W3E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028