UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'DjCoV7CR++KE/CWqZ6bx/kJaW/vlz3ItdfzhfF0mwMI=' 
WHERE 
  key_id = 'bae411d74dd9b2a402e2f6c1291c46f2851ed8fb0a3d48c90704a33960642add' 
  AND (
    token = 'DjCoV7CR++KE/CWqZ6bx/kJaW/vlz3ItdfzhfF0mwMI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016