UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hbRjOJgGD/acSZxlTCUNHrsXwOpDY1Qa0kwQLxM+gHk=' 
WHERE 
  key_id = '281ee5151348760fca3f51a77885041129b5b640d01a515c244fa52a6ebc7e0a' 
  AND (
    token = 'hbRjOJgGD/acSZxlTCUNHrsXwOpDY1Qa0kwQLxM+gHk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015